package com.start.cstarguardianadaptivelearningbackend.service.impl;

import com.start.cstarguardianadaptivelearningbackend.entity.Subject;
import com.start.cstarguardianadaptivelearningbackend.mapper.SubjectMapper;
import com.start.cstarguardianadaptivelearningbackend.service.SubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SubjectServiceImpl implements SubjectService {

    private final SubjectMapper subjectMapper;

    @Autowired
    public SubjectServiceImpl(SubjectMapper subjectMapper) {
        this.subjectMapper = subjectMapper;
    }

    @Override
    public List<Subject> getAllSubjects() {
        return subjectMapper.findAllSubjects();
    }
}